package net.stogi.common.gwt.dispatch.server.core.impl;

import net.stogi.common.gwt.dispatch.client.core.DispatchService;
import net.stogi.common.gwt.dispatch.server.core.Dispatch;
import net.stogi.common.gwt.dispatch.shared.core.Action;
import net.stogi.common.gwt.dispatch.shared.core.Result;

@SuppressWarnings("unchecked")
public class DispatchServiceImpl implements DispatchService {

	private Dispatch dispatch;

	public DispatchServiceImpl(Dispatch dispatch) {
		this.dispatch = dispatch;
	}

	public Result execute(Action<?> action) throws Exception {
		return dispatch.execute(action);
	}
}
